﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BLToolkit.Mapping;
using BLToolkit.DataAccess;


namespace Entities
{
   public class ChiTietHoaDon
    {
       //IHangHoaRepository hh=new HangHoaRepository();
        [PrimaryKey]
        public int ID { get; set; }
        public string MaHD { get; set; }
        public string HangHoa { get; set; }
        public int SoLuong { get; set; }
        public int GiamGia { get; set; }
        public int TongTienTruocGiamGia { get; set; }
        public int TongTienSauGiamGia { get; set; }
       //[MapIgnore]
        public ChiTietHoaDon()
        {
        }
        public ChiTietHoaDon(string mahd, string hanghoa, int SL, int giamgia, int tongtientruoc)
        {
            MaHD = mahd;
            HangHoa = hanghoa;
            SoLuong = SL;
            GiamGia = giamgia;
            TongTienTruocGiamGia = tongtientruoc;
            TongTienSauGiamGia = (TongTienTruocGiamGia * GiamGia) / 100;
        }
    }
}
